package com.cybertron.ironhide.spider.plugin;

import java.util.Arrays;
import java.util.List;

/**
 * 扩展点
 * 
 * @author weiwei
 * 
 */
public class ExtensionPoints {

	public final static String TASK = "task";
	public final static String BEGIN = "begin";
	public final static String FETCH = "fetch";
	public final static String DIG = "dig";
	public final static String DUP_REMOVAL = "dup_removal";
	public final static String TARGET = "target";
	public final static String PARSE = "parse";
	public final static String POJO = "pojo";
	public final static String END = "end";

	public static boolean contains(String name) {
		return TASK.equals(name) || BEGIN.equals(name) || FETCH.equals(name)
				|| DIG.equals(name) || DUP_REMOVAL.equals(name)
				|| TARGET.equals(name) || PARSE.equals(name)
				|| POJO.equals(name) || END.equals(name);
	}

	public static String string() {
		return "[" + TASK + ", " + BEGIN + ", " + FETCH + ", " + DIG + ", "
				+ DUP_REMOVAL + "," + ", " + TARGET + ", " + PARSE + ", "
				+ POJO + ", " + END + "]";
	}

	public static List<String> toArray() {
		return Arrays.asList(TASK, BEGIN, FETCH, DIG, DUP_REMOVAL, TARGET,
				PARSE, POJO, END);
	}
}
